<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body bgcolor="#ffc0cb">
<span th:text="${msg}"></span>
<hr>
<span th:if="${sex}=='男'">男</span>
<hr>
<span th:if="${sex}=='女'">女</span>
<hr>

<input type="text" name="username" th:value="${msg}">
<hr>
<input type="text" name="msg" th:value="${#strings.substring(msg,0,6)}">
<hr>
<input type="text" name="birth" th:value="${#dates.format(birth,'yyyy-MM-dd  HH:mm:ss')}"/>
</body>
</html>